package com.flower.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.flower.mapper.IManageProductDao;
import com.flower.pojo.Product;
import com.flower.service.IManageProductService;

/**
 * 管理员模块 ———— 商品管理
 */
@Service("manageProductService")
public class ManageProductServiceImpl implements IManageProductService{
	
	@Resource(name = "IManageProductDao")
	private IManageProductDao iManageProductDao;

	@Override
	public List<Product> selectAllProduct() {
		return iManageProductDao.selectAllProduct();
	}

	@Override
	public int insertProduct(Product product) {
		return iManageProductDao.insertProduct(product);
	}

	@Override
	public int deleteProduct(int pid) {
		return iManageProductDao.deleteProduct(pid);
	}

	@Override
	public int updatePid(int pid) {
		return iManageProductDao.updatePid(pid);
	}

	@Override
	public int updateProduct(Product product) {
		return iManageProductDao.updateProduct(product);
	}

}
